package com.yihao.biz.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yihao.biz.entity.User;
import com.yihao.biz.mapper.UserMapper;
@Service
@Transactional(readOnly = true)
public class UserService {
	@Autowired
	private UserMapper userMapper;

	public User getUserById(Integer id) {
		return userMapper.getUserById(id);
	}

	public List<User> getUserList(User user) {
		return userMapper.getUserList(user);
	}

	public int add(User user) {
		return userMapper.add(user);
	}

	public int update(Integer id, User user) {
		return userMapper.update(id, user);
	}

	public int delete(Integer id) {
		return userMapper.delete(id);
	}
}
